Eigenproblems

Eigenproblems can easily be solved with the Numpy module. So make sure it is imported in your code:

import numpy as np

Calculating eigenvalues and eigenvectors

Here are the functions you can use:

Example:

import numpy as np

a = np.array([[1, -2], [2, 5]])

w, v = np.linalg.eigh(a)

print("Eigenvalues = ", w)
print("Eigenvectors = ", v)
Try it out